package com.meituan.sdk.model.ddzh.tuangou.deviceChangeCallback;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 设备启动/操作的结果回调
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/tuangou/device/change/callback",
    businessId = 58,
    apiVersion = "10072",
    apiName = "device_change_callback",
    needAuth = true
)
public class DeviceChangeCallbackRequest implements MeituanRequest<DeviceChangeCallbackResponse> {
    /**
    * <p data-diff-id="ct-diff-id-a26ae985-22e9-4d04-980f-a0a361cbfc72"><span style="color: #333">对应的设备启动或操作的编号（若三方获取有误，兜底传0）</span></p>
    */
    @NotBlank(message = "requestId不能为空")
    @SerializedName("requestId")
    private String requestId;
    /**
    * <p data-diff-id="ct-diff-id-96ea95ac-2818-40d1-b6a7-b548dd58645b"><span style="color: #333">三方设备ID</span></p>
    */
    @NotBlank(message = "thirdPartyDeviceItemId不能为空")
    @SerializedName("thirdPartyDeviceItemId")
    private String thirdPartyDeviceItemId;
    /**
    * <p data-diff-id="ct-diff-id-b3b0aa62-2dcd-455d-a9fb-348c9c827ed6"><span style="color: #333">美团券码</span></p>
    */
    @NotBlank(message = "couponId不能为空")
    @SerializedName("couponId")
    private String couponId;
    /**
    * <p data-diff-id="ct-diff-id-1f577e3a-d8c6-433a-b5e6-390064a3467d">设备启动/操作的结果-1超时、0失败、1成功</p>
    */
    @NotNull(message = "result不能为空")
    @SerializedName("result")
    private Integer result;
    /**
    * <p data-diff-id="ct-diff-id-79b741b2-b188-467b-9c56-6c78b1160fcb"><span style="color: #333">履约结束时间时间戳</span></p>
    */
    @SerializedName("occupyEndTime")
    private Long occupyEndTime;

    public String getRequestId() {
        return requestId;
    }
    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }
    public String getThirdPartyDeviceItemId() {
        return thirdPartyDeviceItemId;
    }
    public void setThirdPartyDeviceItemId(String thirdPartyDeviceItemId) {
        this.thirdPartyDeviceItemId = thirdPartyDeviceItemId;
    }
    public String getCouponId() {
        return couponId;
    }
    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }
    public Integer getResult() {
        return result;
    }
    public void setResult(Integer result) {
        this.result = result;
    }
    public Long getOccupyEndTime() {
        return occupyEndTime;
    }
    public void setOccupyEndTime(Long occupyEndTime) {
        this.occupyEndTime = occupyEndTime;
    }


    @Override
    public MeituanResponse<DeviceChangeCallbackResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<DeviceChangeCallbackResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "DeviceChangeCallbackRequest{" + "requestId=" + requestId + "," + "thirdPartyDeviceItemId=" + thirdPartyDeviceItemId + "," + "couponId=" + couponId + "," + "result=" + result + "," + "occupyEndTime=" + occupyEndTime + "}";
    }
}
